#define _CRT_SECURE_NO_WARNINGS 1

#include"DCList.h"

void test1()
{
	DCLNode* plist = DCLInit();

	DCLPushBack(plist, 1);
	DCLPushBack(plist, 2);
	DCLPushBack(plist, 3);
	DCLPushBack(plist, 4);
	DCLPushBack(plist, 5);
	DCLPrint(plist);

	DCLPopBack(plist);
	DCLPrint(plist);
}

void test2()
{
	DCLNode* plist = DCLInit();

	DCLPushBack(plist, 1);
	DCLPushBack(plist, 2);
	DCLPushBack(plist, 3);
	DCLPushBack(plist, 4);
	DCLPushBack(plist, 5);
	DCLPrint(plist);

	DCLPushFront(plist, 0);
	DCLPrint(plist);

	DCLPopFront(plist);
	DCLPrint(plist);
}

void test3()
{
	DCLNode* plist = DCLInit();

	DCLPushBack(plist, 1);
	DCLPushBack(plist, 2);
	DCLPushBack(plist, 3);
	DCLPushBack(plist, 4);
	DCLPushBack(plist, 5);
	DCLPrint(plist);

	printf("%d", DCLSize(plist));
}

void test4()
{
	DCLNode* plist = DCLInit();

	DCLPushBack(plist, 1);
	DCLPushBack(plist, 2);
	DCLPushBack(plist, 3);
	DCLPushBack(plist, 4);
	DCLPushBack(plist, 5);
	DCLPrint(plist);

	DCLNode* pos = DCLFind(plist, 3);
	DCLInsert(pos, 30);
	DCLPrint(plist);

	pos = DCLFind(plist,4);
	DCLErase(pos);
	DCLPrint(plist);

}

int main()
{
	//test1();
	//test2();
	//test3();
	//test4();

	return 0;
}